package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import com.sky.vo.DishItemVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    /*
    * g根据菜品id查询套餐id
    * */

    public List<Long> getSetmealIdsByDishIds(List<Long> dishIds);

    /**插入套餐中的菜品信息
     *
     * @param setmealDishes
     */
    //@AutoFill(value = OperationType.INSERT)
    void addSetmealdish(List<SetmealDish> setmealDishes);

    /**根据套餐ID删除菜品信息
     *
     * @param ids
     */
    void deleteBySetmealId(List<Long> ids);

    /**
     * 根据套餐id查询菜品信息     * @param id
     * @return
     */
    @Select("select * from setmeal_dish where setmeal_id = #{setmealId}")
    List<SetmealDish> getById(Long id);



    List<DishItemVO> getSetmealDishBySetmealId(Long id);
}
